<?php

$userid     = get_loggedin_userid();
$email      = get_input('email');

if($email != "") {
    $result = remove_email($userid, $email);
    echo json_encode(export_result(200, array('Removed email!')));
} else {
    echo json_encode(export_result(400, array('Error!')));
}

?>
